/**
 * 
 */
package ar.edu.utn.frgp.taglibs;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;

/**
 * @author PUSDERKIS
 *
 */
public class TagHead extends TagSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8004752051692595641L;

	/* (non-Javadoc)
	 * @see javax.servlet.jsp.tagext.TagSupport#doStartTag()
	 */
	@Override
	public int doStartTag() throws JspException {
		
		StringBuffer sb = new StringBuffer(200);
		try{
		sb.append("<link href=\"");
		sb.append(((HttpServletRequest) pageContext.getRequest()).getContextPath());
		sb.append("/static/css/mensajesError.css\" type=\"text/css\" rel=\"stylesheet\" />");
		
		pageContext.getOut().println(sb.toString());
		
		StringBuffer genericosJs = new StringBuffer();
		genericosJs.append("<script type=\"text/javascript\" src=\"")
		.append(((HttpServletRequest) pageContext.getRequest()).getContextPath())
		.append("/static/js/genericos.js\" > </script>");
		
		pageContext.getOut().println(genericosJs.toString());
		
		
		
		} catch (Exception e) {
			e.printStackTrace();
		}
		return super.doStartTag();
	}
	
	

}
